package com.lin.utils;


/**
 * 状态码 枚举类
 */

public enum CodeEnum {

    SUCCESS(200, "成功"),
    FAIL(400, "失败"),
    MODIFICATION_FAIL(400, "修改失败"),
    DELETE_FAIL(400, "删除失败"),
    ADD_FAIL(400, "添加失败"),
    NOT_FOUND(404, "找不到资源"),
    BAD_REQUEST(400, "请求参数错误"),
    SERVICE_UNAVAILABLE(503, "服务不可用");

    private Integer code;
    private String msg;

    CodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
